package com.example.demo.design.strategy;
import java.util.HashMap;
import java.util.Map;

/**
 * @className: Factory
 * @copyright: Copyright (C) 2019-2028, Inc. All rights reserved.
 * @company: 中兴新云.财务云
 * @author: 刘凯
 * @date: 2024/7/1
 * @Description: com.example.demo.handle
 */
public class Factory {
    private static Map<String, Handel> stratagyMap = new HashMap<>();

    public static Handel getInvokeStrategy(String name){
        return stratagyMap.get(name);
    }
    public static void register(String name, Handel handel){
        if(name == null || handel == null){
            return;
        }
        stratagyMap.put(name, handel);
    }

}
